﻿using System;
using System.Diagnostics;
using System.Windows.Forms;

namespace DCS.Extensions.WindowsForms
{
    public static class DiagnosticsUtils
    {
        public static void MeasureTimeAndShowResult(Action action)
        {
            var stopwatch = new Stopwatch();
            
            stopwatch.Start();
            action();
            stopwatch.Stop();
            
            MessageBox.Show(stopwatch.Elapsed.ToString());
        }
    }
}
